import request from '@/utils/request.js'

export function getOrderList(data) {
	return request({
		url: '/member/order',
		method: 'GET',
		data
	})
}

export function getOrderDetail(id) {
	return request({
		url: `/member/order/${id}`,
		method: 'GET',
	})
}

export function getOrderPre() {
	return request({
		url: '/member/order/pre',
		method: 'GET'
	})
}

export function getAgainOrder(id) {
	return request({
		url: `/member/order/repurchase/${id}`,
		method: 'GET'
	})
}

export function getGoods(data) {
	return request({
		url: '/member/order/pre/now',
		method: 'GET',
		data
	})
}

export function postOrder(data) {
	return request({
		url: '/member/order',
		method: 'POST',
		data
	})
}